// vite.config.ts
import path from 'path'
import {
  defineConfig,
  loadEnv
} from 'file:///D:/project/yang/wallper/vue3-vite-study-bilibili/node_modules/.pnpm/vite@5.3.3_@types+node@20.14.9_sass@1.77.6/node_modules/vite/dist/node/index.js'

// build/plugins.ts
import vue from 'file:///D:/project/yang/wallper/vue3-vite-study-bilibili/node_modules/.pnpm/@vitejs+plugin-vue@5.0.5_vite@5.3.3_@types+node@20.14.9_sass@1.77.6__vue@3.4.31_typescript@5.5.3_/node_modules/@vitejs/plugin-vue/dist/index.mjs'
import vueJsx from 'file:///D:/project/yang/wallper/vue3-vite-study-bilibili/node_modules/.pnpm/@vitejs+plugin-vue-jsx@4.0.0_vite@5.3.3_@types+node@20.14.9_sass@1.77.6__vue@3.4.31_typescript@5.5.3_/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs'
import eslintPlugin from 'file:///D:/project/yang/wallper/vue3-vite-study-bilibili/node_modules/.pnpm/vite-plugin-eslint@1.8.1_eslint@8.57.0_vite@5.3.3_@types+node@20.14.9_sass@1.77.6_/node_modules/vite-plugin-eslint/dist/index.mjs'
import AutoImport from 'file:///D:/project/yang/wallper/vue3-vite-study-bilibili/node_modules/.pnpm/unplugin-auto-import@0.17.6_@vueuse+core@10.11.0_vue@3.4.31_typescript@5.5.3___rollup@4.18.0/node_modules/unplugin-auto-import/dist/vite.js'
import Components from 'file:///D:/project/yang/wallper/vue3-vite-study-bilibili/node_modules/.pnpm/unplugin-vue-components@0.27.2_@babel+parser@7.24.7_rollup@4.18.0_vue@3.4.31_typescript@5.5.3_/node_modules/unplugin-vue-components/dist/vite.js'
import { NaiveUiResolver } from 'file:///D:/project/yang/wallper/vue3-vite-study-bilibili/node_modules/.pnpm/unplugin-vue-components@0.27.2_@babel+parser@7.24.7_rollup@4.18.0_vue@3.4.31_typescript@5.5.3_/node_modules/unplugin-vue-components/dist/resolvers.js'
import { viteMockServe } from 'file:///D:/project/yang/wallper/vue3-vite-study-bilibili/node_modules/.pnpm/vite-plugin-mock@3.0.2_esbuild@0.21.5_mockjs@1.1.0_vite@5.3.3_@types+node@20.14.9_sass@1.77.6_/node_modules/vite-plugin-mock/dist/index.mjs'
function createVitePlugins({ command }) {
  return [
    vue(),
    viteMockServe({
      mockPath: 'mock',
      // mock文件夹路径
      enable: false
      // 只有开发环境才开启mock
    }),
    vueJsx(),
    eslintPlugin({
      include: [
        'src/**/*.ts',
        'src/**/*.js',
        'src/**/*.vue',
        'src/*.ts',
        'src/*.js',
        'src/*.vue'
      ]
    }),
    AutoImport({
      dirs: ['./src/composables', './src/hooks'],
      imports: [
        'vue',
        'vue-router',
        'pinia',
        '@vueuse/core',
        {
          'naive-ui': [
            'useDialog',
            'useMessage',
            'useNotification',
            'useLoadingBar'
          ]
        }
      ],
      include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/],
      dts: 'src/types/auto-import.d.ts',
      eslintrc: {
        enabled: true,
        filepath: 'src/types/.eslintrc-auto-import.json',
        globalsPropValue: true
      }
    }),
    Components({
      dirs: ['src/components/autoimport'],
      dts: 'src/types/components.d.ts',
      resolvers: [NaiveUiResolver()]
    })
  ]
}

// vite.config.ts
var __vite_injected_original_dirname =
  'D:\\project\\yang\\wallper\\vue3-vite-study-bilibili'
var viteConfig = defineConfig(mode => {
  const root = process.cwd()
  const env = loadEnv(mode.mode, root)
  const { VITE_PORT } = env
  return {
    plugins: createVitePlugins(mode),
    test: {
      environment: 'happy-dom'
    },
    define: {
      'process.env': {}
      // 将上面的env赋值到这里
    },
    server: {
      host: true,
      port: VITE_PORT,
      proxy: {
        '/api': {
          target: env.VITE_BASEURL,
          // 目标服务器地址
          ws: true,
          // 是否启用 WebSocket
          changeOrigin: true,
          // 是否修改请求头中的 Origin 字段
          rewrite: path2 => path2.replace(/^\/api/, '')
        }
      }
    },
    root: process.cwd(),
    // 项目根目录
    resolve: {
      alias: {
        '@': path.resolve(__vite_injected_original_dirname, './src'),
        '@yang': path.resolve(__vite_injected_original_dirname, './src/library')
      }
    },
    css: {
      preprocessorOptions: {
        scss: {
          additionalData: '@import "@/theme/index.scss";'
        }
      }
    }
  }
})
var vite_config_default = viteConfig
export { vite_config_default as default }
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiLCAiYnVpbGQvcGx1Z2lucy50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiY29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2Rpcm5hbWUgPSBcIkQ6XFxcXHByb2plY3RcXFxceWFuZ1xcXFx3YWxscGVyXFxcXHZ1ZTMtdml0ZS1zdHVkeS1iaWxpYmlsaVwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiRDpcXFxccHJvamVjdFxcXFx5YW5nXFxcXHdhbGxwZXJcXFxcdnVlMy12aXRlLXN0dWR5LWJpbGliaWxpXFxcXHZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9EOi9wcm9qZWN0L3lhbmcvd2FsbHBlci92dWUzLXZpdGUtc3R1ZHktYmlsaWJpbGkvdml0ZS5jb25maWcudHNcIjsvLy8gPHJlZmVyZW5jZSB0eXBlcz1cInZpdGVzdFwiIC8+XG5pbXBvcnQgcGF0aCBmcm9tICdwYXRoJ1xuaW1wb3J0IHsgZGVmaW5lQ29uZmlnLCBsb2FkRW52IH0gZnJvbSAndml0ZSdcbmltcG9ydCB0eXBlIHsgQ29uZmlnRW52IH0gZnJvbSAndml0ZSdcbmltcG9ydCB7IGNyZWF0ZVZpdGVQbHVnaW5zIH0gZnJvbSAnLi9idWlsZC9wbHVnaW5zJ1xuXG4vLyBodHRwczovL3ZpdGVqcy5kZXYvY29uZmlnL1xuY29uc3Qgdml0ZUNvbmZpZyA9IGRlZmluZUNvbmZpZygobW9kZTogQ29uZm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